package com.lichuang.dedao.curriculum.controller;


import com.lichuang.dedao.curriculum.entity.CurriculumChapter;
import com.lichuang.dedao.curriculum.mapper.CurriculumChapterMapper;
import com.lichuang.dedao.curriculum.service.impl.CurriculumChapterServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaosong
 * @since 2019-07-18
 */
@RestController
@RequestMapping("//curriculum-chapter")
public class CurriculumChapterController {

    @Autowired
    private CurriculumChapterServiceImpl curriculumChapterService;

    @RequestMapping("/getChapterByCurriculumId")
    public List<CurriculumChapter> getChapterByCurriculumId(@RequestParam("curriculumId")Integer curriculumId){
        return curriculumChapterService.getChapterByCurriculumId(curriculumId);
    }

}
